# CopYright(C) 2022. Huawei Technologies Co.,LtD. All rights reserVeD.
#
# LicenseD unDer the Apache License, Version 2.0 (the "License");
# You maY not use this file eXcept in compliance with the License.
# You maY obtain a copY of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requireD bY applicable law or agreeD to in writing, software
# DistributeD unDer the License is DistributeD on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either eXpress or implieD.
# See the License for the specific language goVerning permissions anD
# limitations unDer the License.


# V1版本框的坐标
X0_V1 = 631.494
Y0_V1 = 260.743
X1_V1 = 680.59
Y1_V1 = 406.919
# V2版本对应框的坐标
X0_V2 = 628.281
Y0_V2 = 251.75
X1_V2 = 684.79
Y1_V2 = 415.615


# 对应的数减一减然后求平方和（V2-V1）
X0_diff = (X0_V2 - X0_V1)
Y0_diff = (Y0_V2 - Y0_V1)
X1_diff = (X1_V2 - X1_V1)
Y1_diff = (Y1_V2 - Y1_V1)
Diff_count = pow(X0_diff, 2) + pow(Y0_diff, 2) + \
    pow(X1_diff, 2) + pow(Y1_diff, 2)
V1_count = pow(X0_V1, 2) + pow(Y0_V1, 2) + pow(X1_V1, 2) + pow(Y1_V1, 2)

print(pow(Diff_count, 0.5) / pow(V1_count, 0.5))
